﻿@inherits BasePage
@page "/Role/List"
<TableGroup>
    <Table TItem="RoleModel" ShowLoading="true"
           ShowToolbar="true" ShowDefaultButtons="true" ShowAddButton="true"
           ShowExtendButtons="true" ShowEditButton="true" ShowDeleteButton="true"
           OnSaveAsync="OnSaveAsync" OnDeleteAsync="OnDeleteAsync"
           ShowSearch="true" ShowAdvancedSearch="false" ShowRefresh="true" IsStriped="true" IsBordered="true" ShowLineNo="true"
           IsPagination="true" OnQueryAsync="@OnQueryAsync">

        <TableColumns>
            <TableColumn @bind-Field="@context.Name" />
            <TableColumn @bind-Field="@context.IsEnabled" ComponentType="@typeof(Switch)" />
            <TableColumn @bind-Field="@context.Remarks" />
        </TableColumns>

        <RowButtonTemplate Context="obj">
            <TableCellButtonItem Item="obj" Icon="fa fa-info-circle" Text="编辑权限" OnClickWithoutRenderItem="EditRolePermission"></TableCellButtonItem>
        </RowButtonTemplate>
    </Table>
</TableGroup>